package com.example.databean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;


@Data
public class LoginParam {

    /**用户名*/
    @NotEmpty(message="用户名不能为空")
    @Pattern(regexp = "^[0-9A-Za-z]{4,20}$", message = "用户名至少4个字母或数字")
    private String userId;


    /**登录密码*/
    @NotEmpty(message="登录密码不能为空")
    @Length(min=6,message="登录密码长度不能小于6位")
    private String loginPassword;
}
